package com.company.project.upm.controller.common;

import com.base.common.model.dto.BaseDto;
import com.base.common.model.dto.ListBaseDto;
import com.base.common.model.dto.PageBaseDto;
import com.base.springboot.starter.web.controller.BaseController;
import com.company.project.upm.client.admin.model.modulexxx.request.HelloPageRequest;
import com.company.project.upm.client.service.model.modulexxx.dto.HelloDto;
import com.company.project.upm.client.service.model.modulexxx.param.HelloRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @Description 前端控制器
 * @Author zhongbo.yu
 * @Date 2021/12/28
 */
@Api(value = "前端控制器")
@RestController
@RequestMapping("xx")
public class AdminController extends BaseController {

    @PostMapping("queryPage")
    @ApiOperation(value = "查询分页")
    public PageBaseDto<HelloDto> queryPage(@RequestBody @Valid HelloPageRequest request) {
        return null;
    }

    @PostMapping("queryList")
    @ApiOperation(value = "查询列表")
    public ListBaseDto<HelloDto> queryList(@RequestBody @Valid HelloRequest request) {
        return null;
    }

    @GetMapping("getById")
    @ApiOperation(value = "查询详情")
    public HelloDto getById(@RequestParam(defaultValue = "1") String id) {
        return null;
    }

    @PostMapping("/save")
    @ApiOperation(value = "更新")
    public BaseDto save(@RequestBody HelloRequest request) {
        return null;
    }
}